package com.wk.service.implement;

import com.wk.dao.Talkdao;
import com.wk.pojo.Messages;
import com.wk.pojo.User;
import com.wk.service.Talkservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: thesis
 * @description: 学生的交谈类
 * @author: 王侃
 * @create: 2020-03-04 10:57
 **/
@Service
public class Talkserviceimpl implements Talkservice {

    @Autowired
    Talkdao talkdao;

    @Override
    public User selectbyiduser(Integer id) {
        return talkdao.selectbyiduser(id);
    }

    @Override
    public List<Messages> selectbyallmessages(Integer my_id, Integer others_id) {
        return talkdao.selectbyallmessages(my_id, others_id);
    }

    @Override
    public void insertintoMessages(Messages messages) {
        talkdao.insertintoMessages(messages);
    }

    @Override
    public void deletbyidmessage(Integer id) {
        talkdao.deletbyidmessage(id);
    }

    @Override
    public List<Messages> selectbyreceiver_message_id(Integer receiver_id) {
        return talkdao.selectbyreceiver_message_id(receiver_id);
    }
}
